Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms

Public Class FrmCrThongKeNhapXuat_KhachHang
    Private data As DataTable
    Private Tungay, Denngay As String
    Private Mahanghoa, Tenhanghoa As String
    Private customerReport As ReportDocument

    Private Sub FrmCrThongKeNhapXuat_KhachHang_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim reportPath = Application.StartupPath & "\" & "CrThongKeNhapXuat_KhachHang.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleDatabaseConn.GetDataTable("SELECT * FROM tbl_thongkenhapxuat_khachhang"))
        customerReport.SetParameterValue("Tngay", Tungay)
        customerReport.SetParameterValue("Dngay", Denngay)
        customerReport.SetParameterValue("TMaKH", Mahanghoa)
        customerReport.SetParameterValue("TTenKH", Tenhanghoa)
        customerReport.SetParameterValue("company", globalVariale.COMPANY)
        customerReport.SetParameterValue("address", globalVariale.ADDRESS)
        customerReport.SetParameterValue("thukho", globalVariale.THUKHO)
        Me.CrThekho_NXTTongHopview.ReportSource = customerReport
    End Sub

    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Close()
    End Sub
    Public Sub setMaHH(ByVal s As String)
        Mahanghoa = s
    End Sub

    Public Sub setTenHH(ByVal s As String)
        Tenhanghoa = s
    End Sub
    Public Sub setTungay(ByVal s As String)
        Tungay = s
    End Sub

    Public Sub setDenngay(ByVal s As String)
        Denngay = s
    End Sub

    Public Sub setData(ByVal d As DataTable)
        data = d
    End Sub


End Class
